package org.leumasjaffe.initiativeTracker.distributed.controller;

import static org.leumasjaffe.initiativeTracker.operator.InitiativeController.tracker;

import org.eclipse.jdt.annotation.NonNullByDefault;

import edu.wpi.heineman.xml.Message;
import edu.wpi.heineman.client.IMessageHandler;

@NonNullByDefault
public class DelayHandler implements IMessageHandler {

	@SuppressWarnings("null")
	@Override
	public void process(Message response) {
		tracker(response.contents.getFirstChild().getAttributes().getNamedItem("game").getNodeValue())
		.root.delay();
	}

	@Override
	public IMessageHandler newCopy() {
		return new DelayHandler();
	}

}
